<!DOCTYPE html>
<html>
<head>
    <title>目标管理表</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" placeholder="业务员"/>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.month" placeholder="月份"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("target:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("target:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("target:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="target" :rules="ruleValidate" :label-width="120">

            <row :gutter="24">
                <i-col span="6">
                    <Form-item label="月份" prop="month">
                        <i-input v-model="target.month" placeholder="格式yyyy-MM"/>
                    </Form-item>
                </i-col>
                <i-col span="6">
                    <form-item label="业务员" prop="promoUserId">
                        <i-select v-model="target.promoUserId" filterable>
                            <i-option v-for="item in options.agentList" :value="item.value" :key="item.value">{{
                                item.label
                                }}
                            </i-option>
                        </i-select>
                    </form-item>
                </i-col>

                <i-col span="6">
                    <Form-item label="计划签单个数" prop="planTotalOrder">
                        <i-input v-model="target.planTotalOrder" placeholder="计划签单个数">
                            <span slot="append">个</span>
                        </i-input>
                    </Form-item>
                </i-col>

                <i-col span="6">
                    <Form-item label="计划签单金额" prop="planTotalOrderAmount">
                        <i-input v-model="target.planTotalOrderAmount" placeholder="计划签单金额">
                            <span slot="append">万</span>
                        </i-input>

                    </Form-item>
                </i-col>
            </row>

            <row :gutter="24">
                <i-col span="24">
                    <Form-item label="备注" prop="remark">
                        <i-input v-model="target.remark" type="textarea" :rows="4"
                                 placeholder="请输入备注"></i-input>
                    </Form-item>
                </i-col>
            </row>

            <Form-item>
                <i-button type="primary" v-show="!detailAction" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" v-show="!detailAction" @click="handleReset('formValidate')"
                          style="margin-left: 8px">重置
                </i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/lht/target.js?r=_${date.systemTime}"></script>
</body>
</html>